import Cookies from "js-cookie";
export const TOKEN_KEY = 'USERTOKEN';



export const getToken = () => {
    // const token = localStorage.getItem(TOKEN_KEY)
    // if (token && token != '') return token
    // else return false
    return Cookies.get(TOKEN_KEY);
}

export const setToken = (token) => {
    // localStorage.setItem(TOKEN_KEY, token);
    return Cookies.set(TOKEN_KEY, token);
}

export const delToken = () => {
    // localStorage.removeItem(TOKEN_KEY);
    return Cookies.remove(TOKEN_KEY);
}